<?php
include_once ('../global.php');

class CApp extends App_Page_Admin
{
	private $cid;
	
	private $list;
	private $total;
	
	protected function getPara()
    {
    	$this->cid = Tool_Input::clean('r', 'cid', 'int');
    }

	protected function checkPara()
    {
    	if (empty($this->cid))
    	{
    		$this->cid = 2;
    	}
    }

    protected function main()
    {
    	$this->list = $this->goods_list->getGoods($this->cid, array(), $this->total);
    	
        $this->setTitle("Welcome!");
        $this->setCurrMenu('goods', 'goods_list');
    }

    protected function outputBody()
    {
    	$this->smarty->assign('goodsList', $this->list);
        $this->smarty->display("admin/goods_list.html");
    }
}

$app = new CApp("");
$app->run();
?>